<template>
	<view class="head">
		<image src="/static/img/back.png" @tap="backBtn" class="back"></image>
		<text class="title">{{title}}</text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			}
		},
		props: {
			title: {
				type: String,
				default: ""
			},
			backBtn:{
				default: function() {
					return function() {
						uni.navigateBack({
							delta: 1
						})
					}
				}
			},
		}
	}
</script>

<style>
	.head {
		position: fixed;
		z-index: 1000;
		height: 40rpx;
		top: 0;
		width: 100%;
		padding-top: calc(var(--status-bar-height) + 80rpx);
		background: #fff;
	}
	.back {
		position: absolute;
		width: 14rpx;
		height: 26rpx;
		margin-left: 30rpx;
		margin-top: -20rpx;
	}
	.title {
		display: block;
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: rgba(51,51,51,1);
		text-align: center;
		margin-top: -36rpx;
	}
</style>
